<?php

namespace app\admin\service;

use think\facade\Request;

trait SystemLogWithToken
{
    use SystemLog;
    private static function log($data = null)
    {
        $data['create_time'] = time();
        $data['maker'] = self::getUId($data['token']);
        $data['ip'] = Request::ip();
        $data['equipment'] = Request::header('User-Agent');
        \app\admin\model\Log::create($data);
    }
}
